package com.xy.xdb;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import com.xy.xdb.mapper.UserMapper;

/**
 * Hello world!
 *
 */
@SpringBootApplication
public class App 
{
	static Logger logger = LogManager.getLogger(App.class);
    public static void main( String[] args )
    {
    	ConfigurableApplicationContext context = SpringApplication.run(App.class, args);
    	UserMapper userMapper = context.getBean(UserMapper.class);
    	
//    	UserEntity user = new UserEntity("adf", "2ffd", "ADMIN");
//    	userMapper.insert(user);
//    	System.out.println(user);
//        Page<UserEntity> page = new Page<UserEntity>(1, 1,"id");
//        page.setAsc(false);
//        page.setRecords(userMapper.selectPage(page,null));
    	
    	System.out.println(userMapper.selectById(1));
    	System.out.println(userMapper.selectById(1));
    	System.out.println(userMapper.selectById(1));
    }
    
}
